import request from '@/utils/request'

// 查询公告管理列表
export function listPublishManage(query) {
  return request({
    url: '/messages/publishManage/list',
    method: 'get',
    params: query
  })
}

// 查询公告管理详细
export function getPublishManage(id) {
  return request({
    url: '/messages/publishManage/' + id,
    method: 'get'
  })
}

// 新增公告管理
export function addPublishManage(data) {
  return request({
    url: '/messages/publishManage',
    method: 'post',
    data: data
  })
}

// 修改公告管理
export function updatePublishManage(data) {
  return request({
    url: '/messages/publishManage',
    method: 'put',
    data: data
  })
}

// 删除公告管理
export function delPublishManage(id) {
  return request({
    url: '/messages/publishManage/' + id,
    method: 'delete'
  })
}

// 开关
export function resetStatus(data) {
  return request({
    url: '/messages/publishManage/resetStatus',
    method: 'post',
    data: data
  })
}
